package ltd.bugs.cute.mybatis.manager;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import ltd.bugs.cute.mybatis.model.Student;
import ltd.bugs.cute.mybatis.service.StudentService;

@Component
public class StudentManager {

  @Autowired
  private StudentService studentService;
  @Autowired
  private StudentManager2 studentManager2;

  public void add(Student student) {
    studentService.add(student);
  }

  public Student get(long id) {
    return studentService.get(id);
  }

  public void bothAdd(Student student) {
    studentService.add(student);
    studentManager2.add(student);
  }
}
